}
rule_apt_get_install () { # SYNTAX: $package
- sudo apt-get install "$@"
+ sudo DEBIAN_FRONTEND=noninteractive apt-get install "$@"
+ }
+rule_dpkg_reconfigure () { # SYNTAX: $package
+ sudo DEBIAN_FRONTEND=noninteractive dpkg-reconfigure "$@"
}
rule__chrooted_configure () { # NOTE: est-ce bien utile à un moment ?
EOF
}
rule_boot_configure () {
- warn "lors de l'installation Debian, surtout n'installer GRUB sur AUCUN disque proposé !"
+ #warn "lors de l'installation Debian, surtout n'installer GRUB sur AUCUN disque proposé !"
+ sudo debconf-set-selections <<-EOF
+ grub-pc grub-pc/install_devices multiselect
+ EOF
rule apt_get_install grub-pc
sudo install -d -m 644 -o root -g root /boot/grub
rule apt_get_install linux-image-$vm_arch
# NOTE: clefs générées par Debian
sudo update-initramfs -u
}
-rule_time_configure () {
- sudo install -m 644 -o root -g root /dev/stdin /etc/timezone <<-EOF
- Europe/Paris
- EOF
- sudo dpkg-reconfigure tzdata
- rule apt_get_install ntp
- }
rule_locale_configure () {
- sudo install -m 644 -o root -g root /dev/stdin /etc/locale.gen <<-EOF
- fr_FR.UTF-8 UTF-8
+ sudo debconf-set-selections <<-EOF
+ locales locales/default_environment_locale select None
+ locales locales/locales_to_be_generated multiselect fr_FR.UTF-8 UTF-8
EOF
- sudo update-locale
+ rule dpkg_reconfigure locales
}
rule_login_configure () {
sudo install -m 644 -o root -g root /dev/stdin /etc/inittab <<-EOF
rule_postfix_configure () {
local hint="run vm_remote postfix_key_send before"
assert "test -f /etc/postfix/$vm_domainname/smtpd/x509/key.pem" hint
- warn "lors de l'installation Debian, ne sélectionner aucune configuration pour postfix"
+ #warn "lors de l'installation Debian, ne sélectionner aucune configuration pour postfix"
+ sudo debconf-set-selections <<-EOF
+ postfix postfix/main_mailer_type select No configuration
+ EOF
rule apt_get_install postfix
sudo install -m 640 -o root -g root /dev/stdin /etc/postfix/.gitignore <<-EOF
*.db
do conf=${conf#"$tool"/etc/sysctl.d/}
sudo install -m 660 -o root -g root \
"$tool"/etc/sysctl.d/"$conf" \
- /etc/sysctl.d/"$conf"
+ /etc/sysctl.d/"$conf"
done
sudo sysctl --system
}
+rule_time_configure () {
+ sudo install -m 644 -o root -g root /dev/stdin /etc/timezone <<-EOF
+ Europe/Paris
+ EOF
+ sudo debconf-set-selections <<-EOF
+ tzdata tzdata/Areas select Europe
+ tzdata tzdata/Zones/Europe select Paris
+ EOF
+ rule dpkg_reconfigure tzdata
+ rule apt_get_install ntp
+ }
rule_user_add () { # SYNTAX: $user
rule user_configure
local user=$1